| Conditions | 4 |
| Total Lines | 14 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import type {AtomInGeneral} from "./atom.types" |
||
| 34 | |||
| 35 | function object2classes(rootKey: string, subQuery: undefined|Record<string, boolean|number|string>) { |
||
| 36 | if (!subQuery) |
||
| 37 | return EMPTY_ARRAY |
||
| 38 | |||
| 39 | const classes: string[] = [] |
||
| 40 | for (const key in subQuery) { |
||
| 41 | const subValue = subQuery[key] |
||
| 42 | , value = key === selfKey |
||
| 43 | ? subValue |
||
| 44 | : value2class(key, subValue) |
||
| 45 | value && classes.push(`${rootKey}${delimiter}${value}`) |
||
| 46 | } |
||
| 47 | return classes |
||
| 48 | } |
||
| 59 | } |